package com.smart.enums;

public enum ReportTypeEnum {
    CLASS_TOTAL("1","班报"),
    DAILY_TOTAL("2","日报"),
    WEEKLY_TOTAL("3","周报");

    private String code;
    private String name;
    ReportTypeEnum(String code, String name){
        this.code = code;
        this.name = name;
    }

    public static String getName(String code){
        for (ReportTypeEnum obj : ReportTypeEnum.values()) {
            if(obj.getCode().equals(code)){
                return obj.getName();
            }
        }
        return "";
    }

    public String getName() {
        return name;
    }

    public String getCode() {
        return code;
    }
}
